Tween Data Types
Each tween component is identified by a media subtype that specifies the kind of data handled by the component. The media subtype also specifies the kind of interpolation that occurs. The data is placed in an atom of type
kTweenData
. The kind of data stored for a tween component is specified by one of the following constants:
enum {
kTweenTypeShort = 1,
kTweenTypeLong = 2,
kTweenTypeFixed = 3,
kTweenTypePoint = 4,
kTweenTypeQDRect = 5,
kTweenTypeQDRegion = 6,
kTweenTypeMatrix = 7,
kTweenTypeRGBColor = 8,
kTweenTypeGraphicsModeWithRGBColor = 9,
kTweenType3dScale = '3sca',
kTweenType3dTranslate = '3tra',
kTweenType3dRotate = '3rot',
kTweenType3dRotateAboutPoint = '3rap',
kTweenType3dRotateAboutAxis = '3rax',
kTweenType3dQuaternion = '3qua',
kTweenType3dMatrix = '3mat',
kTweenType3dCameraData = '3cam',
kTweenType3dSoundLocalizationData = `3slc'
};
-
kTweenTypeShort
-
Two signed 16-bit integers from which to interpolate the tween value.
-
kTweenTypeLong
-
Two signed 32-bit integers from which to interpolate the tween value.
-
kTweenTypeFixed
-
Two 32-bit fixed point values from which to interpolate the tween value.
-
kTweenTypePoint
-
Two QuickDraw points from which to interpolate the tween value. Each coordinate (h and v) of the points is interpolated independently. The results of the interpolation on each coordinate are used to specify the tween value, which is a point.
-
kTweenTypeQDRect
-
Two QuickDraw rectangles. Each coordinate (r, l, b, t) of the rectangles is interpolated independently. The result of the interpolation on each coordinate is used to create the tween value, which is a rectangle.
-
kTweenTypeQDRegion
-
Two QuickDraw rectangles and a region, stored in a
kTweenRegionData
atom. Each coordinate (r, l, b, t) of the rectangles is interpolated independently. The result of the interpolation on each coordinate specify a rectangle, into which the region is mapped. The resultant region specifies the tween value.
-
Alternately, the kTweenPictureData atom can be used instead of kTweenTypeQDRegion. The picture is used to generate a region by imaging it the size specified by interpolaring the two rectangles. This allows for smoother region based tween operations to be created.
-
kTweenTypeMatrix
-
Two QuickTime 3x3 matrices. The corresponding cells in the matricies are interpolated independently. The result of the interpolation on each cell specifies a tween value, which is a matrix. Only matrices that specify translation and scaling should be used.
-
kTweenTypeRGBColor
-
Two RGB colors from which to interpolate the tween value. Each color component (r, g, b) of the colors is interpolated independently. The results of the interpolation on each color component are used to specify the tween value, which is an RGB color.
-
kTweenTypeGraphicsModeWithRGBColor
-
Two
ModifierTrackGraphicsModeRecord
records from which to interpolate a tween value. Only the color is interpolated. The graphics mode is taken from the first modifier track graphic mode received.
-
kTweenType3dScale
-
A QuickTime 3D
TQ3Vector3D
record, from which the scale transform is used to interpolate a tween value.
-
kTweenType3dTranslate
-
A QuickTime 3D
TQ3Vector3D
record, from which the translation transform is used to interpolate a tween value.
-
kTweenType3dRotate
-
A QuickTime 3D
TQ3RotateTransformData
record, from which the rotation transform is used to interpolate a tween value.
-
kTweenType3dRotateAboutPoint
-
A QuickTime 3D
TQ3RotateAboutPointTransformData
record, from which the rotate about point transform is used to interpolate a tween value.
-
kTweenType3dRotateAboutAxis
-
A QuickTime 3D
TQ3RotateAboutAxisTransformData
record, from which the angle field of the rotate about axis transform is used to interpolate a tween value.
-
kTweenType3dQuaternion
-
A QuickTime 3D
TQ3Quaternion
record, from which the quaternion transform is used to interpolate a tween value.
-
kTweenType3dMatrix
-
A QuickTime 3D
TQ3Matrix4x4
record, from which the 4x4 matrix transform is used to interpolate a tween value.
-
kTweenType3dCameraData
-
A QuickTime 3D TQ3CameraData record, from which the camera data is used to interpolate a tween value.
-
kTweenType3dSoundLocalizationData
-
Two
SSpLocalizationData
records, from which the sound data is used to interpolate a 3D sound value.
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents | Next